<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 *
 *
 * @package default
 * @author kxgsy163@163.com
 */
class whyshopseckill_ctl_admin_yuyue extends desktop_controller{
    //供应商中的商品id 用于生成html、
    private $_filter_goods = null;
    var $workground = 'whyshopseckill_ctl_admin_whyshopseckill';
    function __construct($app) {
        parent::__construct($app);
        $this->_request = kernel::single('base_component_request');
    }
    function index(){
        $actions_base['title'] = app::get('b2c')->_('秒杀预约');
       // $actions_base['actions'] = $custom_actions;
        $actions_base['allow_detail_popup'] = true;//详情弹出
        $actions_base['use_buildin_set_tag'] = true;//是否支持设置标签
        $actions_base['use_buildin_export'] = true;//导出
        $actions_base['use_buildin_filter'] = true;//是否支持高级筛选
        $actions_base['use_view_tab'] = true;//是否支持使用tab

        $this->finder('whyshopseckill_mdl_yuyue',$actions_base
            );
    }
    function  setting(){
        $this->pagedata['pre_minute']=$this->app->getConf('pre_minute');
        $this->pagedata['wx_template_id']=$this->app->getConf('wx_template_id');
        $this->pagedata['wx_template_source']=$this->app->getConf('wx_template_source');

        $this->page('admin/yuyue/setting.html');
    }
    function  saveSetting(){
        $this->begin();

        $this->app->setConf('pre_minute',$_POST['pre_minute']);
        $this->app->setConf('wx_template_id',$_POST['wx_template_id']);
        $this->app->setConf('wx_template_source',$_POST['wx_template_source']);

        $this->end(true,'设置成功');
    }
}
